<template>
    <div>
        121212
        <div>
            我是{{$store.state.name}}
        </div>
        <button @click="gb">我是改变store的数字的</button>
        <button @click="yb">我是异步的</button>
    </div>
</template>
<script>

export default {
    data() {
        return {
            num:0
        }
    },
    mounted(){
        
    },
    methods:{
        gb() {
            this.$store.commit("add",4)
        },
        yb() {
            this.$store.commit("gett")
        }
    }
}
</script>
<style scoped>

</style>